﻿using RTW.Entity.CustomAttributes;
using RTW.OA.Areas.Common.Servers;
using RTW.OA.Areas.System.Servers;
using System;
using System.Collections.Generic;
using System.Web;

namespace RTW.OA.Models
{
    public class official_document
    {
        /// <summary>
        /// 主题
        /// </summary>
        public string SUBJECT { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string BODY { get; set; }
        /// <summary>
        /// 发文者
        /// </summary>
        public string SENDER { get; set; }
        /// <summary>
        /// 拟稿人用户编号
        /// </summary>
        public string DRAFT_USER_NO { get; set; }
        /// <summary>
        /// 紧急程度
        /// </summary>
        public string URGENT_LEVEL { get; set; }
        /// <summary>
        /// 秘密等级
        /// </summary>
        public string SECRET_LEVEL { get; set; }
        /// <summary>
        /// 公文类别
        /// </summary>
        public string CATEGORY { get; set; }
        /// <summary>
        /// 年度
        /// </summary>
        public string DOC_YEAR { get; set; }
        /// <summary>
        /// 文号
        /// </summary>
        public string DOC_NUM { get; set; }
        /// <summary>
        /// 发文页数
        /// </summary>
        public int DOC_PAGE_COUNT { get; set; }
        /// <summary>
        /// 文档格式
        /// </summary>
        public string DOC_FORMAT { get; set; }
        /// <summary>
        /// 起始号
        /// </summary>
        public int START_NUM { get; set; }
        /// <summary>
        /// 拟稿单位
        /// </summary>
        public string DRAFT_UNIT { get; set; }
        /// <summary>
        /// 拟稿人
        /// </summary>
        public string DRAFT_AUTHOR { get; set; }
        /// <summary>
        /// 接收单位
        /// </summary>
        public string RECEIVE_UNITS { get; set; }
        /// <summary>
        /// 接收单位显示文本
        /// </summary>
        public string RECEIVE_UNITS_TEXT { get; set; }
        /// <summary>
        /// 接收人
        /// </summary>
        public string RECEIVERS { get; set; }
        /// <summary>
        /// 接收人显示文本
        /// </summary>
        public string RECEIVERS_TEXT { get; set; }
        /// <summary>
        /// 接收单位，用于套红头
        /// </summary>
        public string RED_HEAD_RECEIVE_UNITS { get; set; }
        /// <summary>
        /// 抄送，用于套红头
        /// </summary>
        public string RED_HEAD_CC { get; set; }
        /// <summary>
        /// 密送
        /// </summary>
        public string BCC { get; set; }
        /// <summary>
        /// 文件类别
        /// </summary>
        public string DOC_CATEGORY { get; set; }
        /// <summary>
        /// 文件子类别
        /// </summary>
        public string DOC_SUB_CATEGORY { get; set; }
        /// <summary>
        /// 使用模板
        /// </summary>
        public string TEMPLATE { get; set; }
        /// <summary>
        /// 部门领导
        /// </summary>
        public string DEPT_LEADER { get; set; }
        /// <summary>
        /// 部门领导用户编号
        /// </summary>
        public string DEPT_LEADER_USER_NO { get; set; }
        /// <summary>
        /// 办公室领导
        /// </summary>
        public string OFFICE_LEADER { get; set; }
        /// <summary>
        /// 保密年限
        /// </summary>
        public string SECRECY_YEARS { get; set; }
        /// <summary>
        /// 承办单位
        /// </summary>
        public string UNDERTAKE_UNIT { get; set; }
        /// <summary>
        /// 承办人
        /// </summary>
        public string UNDERTAKER { get; set; }
        /// <summary>
        /// 签发人
        /// </summary>
        public string SIGNER { get; set; }
        /// <summary>
        /// 签发人用户编号
        /// </summary>
        public string SIGNER_USER_NO { get; set; }
        /// <summary>
        /// 签发时间
        /// </summary>
        public DateTime? SIGNATURE_TIME { get; set; }
        /// <summary>
        /// 附件
        /// </summary>
        public string ATTACHMENT { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string REMARK { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int STATUS { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CREATE_TIME { get; set; }
        /// <summary>
        /// 是否已归档
        /// </summary>
        public bool IS_ARCHIVE { get; set; }
        /// <summary>
        /// 公文签收列表
        /// </summary>
        [IgnoreColumn]
        public IEnumerable<official_document_receive> official_document_receives { get; set; }
        //{
        //    get
        //    {
        //        var documentReceiveServers = new DocumentReceiveServers();
        //        return documentReceiveServers.GetData(this.DOC_ID);
        //    }
        //}

        /// <summary>
        /// 公文借阅列表
        /// </summary>
        [IgnoreColumn]
        public IEnumerable<official_document_borrow> official_document_borrows { get; set; }
        //{
        //    get
        //    {
        //        var documentBorrowServers = new DocumentBorrowServers();
        //        return documentBorrowServers.GetData(this.DOC_ID);
        //    }
        //}

        /// <summary>
        /// 公文编号
        /// </summary>
        [Id(CheckAutoId = true)]
        public int DOC_ID { get; set; }
    }
}